﻿// ParseLib - An open source library for natural language processing.
// Copyright (C) Kais Dukes, 2012. E-mail: kais@kaisdukes.com
// http://parselib.org

using ParseLib.Tagging;

namespace ParseLib.Corpora
{
    public class Token : IToken
    {
        public string Text { get; private set; }
       
        public PartOfSpeech PartOfSpeech  { get; set; }

        public Token(string text)
        {
            Text = text;
        }

        public Token(string text, PartOfSpeech partOfSpeech)
        {
            Text = text;
            PartOfSpeech = partOfSpeech;
        }

        public IToken CopyText()
        {
            return new Token(Text);
        }

        public override string ToString()
        {
            return string.Format("{0} = POS:{1}", Text, PartOfSpeech);
        }
    }
}
